/*************************************************************************
 Copyright (C) Unpublished Unis Software, Inc. All rights reserved.
 Unis Software, Inc., Confidential and Proprietary.

 This software is subject to copyright protection
 under the laws of the Public of China and other countries.

 Unless otherwise explicitly stated, this software is provided
 by Unis "AS IS".
 *************************************************************************/
package com.unis.dao;

import java.util.List;

import com.unis.model.BaseModel;

/**
 * @author CSJ (email:raulcsj@163.com)
 * @since 2012-11-10
 */
public interface IDataSet4iBatis {
    /****************************************
     * Query result as list with paging or no paging
     * 
     * @param baseModel
     * @return
     ****************************************/
    List<BaseModel> queryAsList(final BaseModel baseModel);

    /****************************************
     * Query result as Object with special params
     * 
     * @param baseModel
     * @return
     ****************************************/
    BaseModel queryAsObject(final BaseModel baseModel);

    /****************************************
     * Insert target model
     * 
     * @param baseModel
     * @return
     ****************************************/
    boolean insert(final BaseModel baseModel);

    /****************************************
     * Delete target model
     * 
     * @param baseModel
     * @return
     ****************************************/
    boolean delete(final BaseModel baseModel);

    /****************************************
     * Update target model
     * 
     * @param baseModel
     * @return
     ****************************************/
    boolean update(final BaseModel baseModel);

    /****************************************
     * Insert target model with batch type
     * 
     * @param baseModel
     * @return
     ****************************************/
    boolean batchInsert(final List<BaseModel> baseModelList);

    /****************************************
     * Delete target model with batch type
     * 
     * @param baseModel
     * @return
     ****************************************/
    boolean batchDelete(final List<BaseModel> baseModelList);

    /****************************************
     * Update target model with batch type
     * 
     * @param baseModel
     * @return
     ****************************************/
    boolean batchUpdate(final List<BaseModel> baseModelList);

}
